﻿<Page x:Class="WpfViewBox.GridSplitterSample"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="312" d:DesignWidth="942"
	Title="GridSplitterSample">
    <Grid>
        <Grid   Background="LightGreen"  Width="300" Height="150" HorizontalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="30*" />
                <ColumnDefinition Width="70*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="80"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="LightCoral"  Margin="10"  Grid.Column="0"/>
            <Rectangle Fill="LightGoldenrodYellow" Margin="10"  Grid.Column="1"/>
            <Rectangle Fill="LightSteelBlue"  Grid.Row="1" Margin="10"  Grid.Column="0"/>
            <Rectangle Fill="LightSalmon"  Grid.Row="1"  Margin="10"  Grid.Column="1"/>
            <!--调整行高-->
            <GridSplitter Background="LightSteelBlue"  Grid.ColumnSpan="2" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"  
                          Height="2"/>
            <!--调整列宽-->
            <GridSplitter  Background="LightGoldenrodYellow" Grid.RowSpan="2" Width="2" />
        </Grid>
    </Grid>
</Page>
